Skip to content

Add native Digepath patch encoder support - #236

Open
LanTing-0119 wants to merge 1 commit into
mahmoodlab:mainfrom
LanTing-0119:feat/digepath-patch-encoder
Open

LanTing-0119 wants to merge 1 commit into
mahmoodlab:mainfrom
LanTing-0119:feat/digepath-patch-encoder

Conversation

@LanTing-0119

Copy link
Copy Markdown

Summary

  • add native digepath patch encoder support backed by xtxx/Digepath
  • support both gated Hugging Face loading and local single-file safetensors checkpoints
  • keep the ViT-L/16 backbone on its native 224 grid while supporting dynamic input sizes that are multiples of 16
  • register the encoder in the CLI, local checkpoint registry, package exports, and documentation

Digepath produces 1024-dimensional embeddings and uses the recommended TRIDENT extraction settings --patch_size 256 --mag 20. The released checkpoint is licensed under CC-BY-NC-4.0.

Testing

  • python -m unittest tests.test_digepath_encoder tests.test_patch_encoder_resize -v (21 tests passed)
  • local released checkpoint strict-load smoke test:
    • native positional embedding: (1, 197, 1024)
    • 224 input: (1, 1024)
    • 448 input: (1, 1024)
  • synthetic ImageWSI feature extraction smoke test:
    • coordinates: (1, 2)
    • features: (1, 1024)
    • encoder metadata: digepath

The local 1.2 GB checkpoint was used only for validation and is not included in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant